package www.alibaba.com.pojo;

/**
 * @author wangpengzhi
 * @Desc: 双向链表定义
 *
 * create on 12-24 for alibaba interview
 */

public class Node {

    /**
     * 节点值
     */
    private Integer value;

    /**
     * 前节点
     */
    private Node preNode;

    /**
     * 后节点
     */
    private Node nextNode;

    //constructed function
    public Node(Integer value) {
        this.value = value;
    }

    //setter and getter
    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public Node getPreNode() {
        return preNode;
    }

    public void setPreNode(Node preNode) {
        this.preNode = preNode;
    }

    public Node getNextNode() {
        return nextNode;
    }

    public void setNextNode(Node nextNode) {
        this.nextNode = nextNode;
    }
}
